<template>
  <d2-container>
    <template slot="header">业务受理</template>
    <el-form ref="form" :model="form" label-width="160px">
      <el-col :span="12" :inline="true">
        <el-form-item label="委托单位">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="合同号">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="单位地址">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="报告材质">
          <el-select v-model="form.region" placeholder="请选择" size="mini">
            <el-option label="纸质" value="shanghai"></el-option>
            <el-option label="电子" value="beijing"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="证书单位名称">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="12">
        <el-form-item label="证书单位地址">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="统一社会信用码">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="邮编">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="机构性质">
          <el-select v-model="form.region" placeholder="请选择" size="mini">
            <el-option label="系统外" value="shanghai"></el-option>
            <el-option label="系统内" value="beijing"></el-option>
            <el-option label="内传" value="beijing"></el-option>
          </el-select>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="联系人">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="固定电话">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="邮箱">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="委托日期">
          <el-date-picker
            v-model="form.name"
            type="date"
            placeholder="选择日期" size="mini">
          </el-date-picker>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="证书日期">
          <el-date-picker
            v-model="form.name"
            type="date"
            placeholder="选择日期" size="mini">
          </el-date-picker>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="是否出具结论">
          <el-radio-group v-model="form.name" size="mini">
            <el-radio label="是"></el-radio>
            <el-radio label="否"></el-radio>
          </el-radio-group>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="是否复校">
          <el-radio-group v-model="form.name" size="mini">
            <el-radio label="是"></el-radio>
            <el-radio label="否"></el-radio>
          </el-radio-group>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="短信号码">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item label="整单备注">
          <el-input v-model="form.name" size="mini"></el-input>
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="是否免费检测">
          <el-radio-group v-model="form.name" size="mini">
            <el-radio label="是"></el-radio>
            <el-radio label="否"></el-radio>
          </el-radio-group>
        </el-form-item>
      </el-col>
      <el-col :span="24">
        <el-form-item>
          <el-button type="primary" @click="onSubmit">立即创建</el-button>
          <el-button>取消</el-button>
        </el-form-item>
      </el-col>
    </el-form>

    <template>
      <el-col :span="24">
        <el-button type="primary" @click="dialogVisible = true">添加器具</el-button>
      </el-col>
      <el-table
        :data="tableData"
        style="width: 100%"
        max-height="400">
        <el-table-column
          fixed
          prop="date"
          label="序号"
          width="150">
        </el-table-column>
        <el-table-column
          prop="name"
          label="器具名称"
          width="120">
        </el-table-column>
        <el-table-column
          prop="province"
          label="器具实际名称"
          width="120">
        </el-table-column>
        <el-table-column
          prop="city"
          label="出厂编号"
          width="120">
        </el-table-column>
        <el-table-column
          prop="address"
          label="服务类型"
          width="300">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="套数"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="件/套"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="证书数量"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="检测部门"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="检测岗位"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="检测期限"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="是否加急"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="是否强检"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="备注"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="规格型号"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="设备编号"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="制造厂商"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="检测参数"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="器具附件"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="器具外观"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="是否双编号"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="是否调修"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="电源类型"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="分包区域"
          width="120">
        </el-table-column>
        <el-table-column
          prop="zip"
          label="器具用途"
          width="120">
        </el-table-column>
        <el-table-column
          fixed="right"
          label="操作"
          width="120">
          <template slot-scope="scope">
            <el-button
              @click.native.prevent="editRow(scope.$index, tableData)"
              type="text"
              size="small">
              编辑
            </el-button>
            <el-button
              @click.native.prevent="deleteRow(scope.$index, tableData)"
              type="text"
              size="small">
              移除
            </el-button>
          </template>
        </el-table-column>
      </el-table>
    </template>
    <el-dialog
      title="提示"
      :visible.sync="dialogVisible"
      :before-close="handleClose">
      <el-form ref="form" :model="form" label-width="120px">
        <el-col :span="12">
          <el-form-item label="器具名称">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="器具实际名称">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="出厂编号">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="服务类型">
            <el-select v-model="form.region" placeholder="请选择活动区域" size="mini">
              <el-option label="检定" value="shanghai"></el-option>
              <el-option label="校准" value="beijing"></el-option>
              <el-option label="检测" value="beijing"></el-option>
              <el-option label="测试" value="beijing"></el-option>
              <el-option label="其他" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="套数">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="件/套">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="证书数量">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="检测部门">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="检测岗位">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="检测岗位">
          <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="是否加急">
            <el-select v-model="form.region" placeholder="请选择活动区域" size="mini">
              <el-option label="否" value="shanghai"></el-option>
              <el-option label="5天 (%5)" value="beijing"></el-option>
              <el-option label="4天 (%10)" value="beijing"></el-option>
              <el-option label="3天 (%15)" value="beijing"></el-option>
              <el-option label="2天 (%20)" value="beijing"></el-option>
              <el-option label="1天 (%25)" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="是否强检">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="备注">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="型号规格">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="设备编号">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="制造厂商">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="检测参数">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="器具附件">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="器具外观">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="是否双编号">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="是否调修">
            <el-select v-model="form.region" placeholder="请选择活动区域" size="mini">
              <el-option label="是" value="shanghai"></el-option>
              <el-option label="否" value="beijing"></el-option>
              <el-option label="资讯" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="电源类型">
            <el-select v-model="form.region" placeholder="请选择活动区域" size="mini">
              <el-option label="无 " value="shanghai"></el-option>
              <el-option label="110v" value="beijing"></el-option>
              <el-option label="220v" value="beijing"></el-option>
              <el-option label="380v" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="分包区域">
            <el-select v-model="form.region" placeholder="请选择活动区域" size="mini">
              <el-option label="无 " value="shanghai"></el-option>
              <el-option label="北京" value="beijing"></el-option>
              <el-option label="上海" value="beijing"></el-option>
              <el-option label="南京" value="beijing"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="12">
          <el-form-item label="器具用途">
            <el-input v-model="form.name" size="mini"></el-input>
          </el-form-item>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
      </div>
    </el-dialog>

  </d2-container>
</template>

<script>
export default {
  name: 'customer_create',
  data () {
    return {
      value1: '',
      dialogVisible: false,
      form: {
        name: ''
      }
    }
  },
  methods: {
    add () {

    }
  }
}
</script>
